package com.zgjkhis.modules.charges.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.zgjkhis.common.service.impl.BaseServiceImpl;
import com.zgjkhis.modules.charges.domain.LogisticsRoute;
import com.zgjkhis.modules.charges.service.LogisticsRouteService;
import com.zgjkhis.modules.charges.service.mapper.LogisticsRouteMapper;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author yxl
 * @Description
 * @Date 2021/7/20 19:51
 **/
@Service
public class LogisticsRouteServiceImpl extends BaseServiceImpl<LogisticsRouteMapper, LogisticsRoute> implements LogisticsRouteService {

    @Override
    public List<LogisticsRoute> queryByNo(String bspOrderNo) {
        QueryWrapper<LogisticsRoute> wrapper = new QueryWrapper<>();
        wrapper.eq("bsp_order_no", bspOrderNo);
        return super.list(wrapper);
    }

    @Override
    public boolean batchDelRoute(String bspOrderNo) {
        QueryWrapper<LogisticsRoute> wrapper = new QueryWrapper<>();
        wrapper.eq("bsp_order_no", bspOrderNo);
        return super.remove(wrapper);
    }
}
